package sdcncsi.ict.counter;


public class CounterNumber {
	private int pv = 0;//PageView计数
	private int ip = 0;//IP来源计数
	private int uv = 0;//访客计数
	private int ss = 0;//独立session计数
	private boolean changed = false;
	private boolean newCounter = true;
	/**
	 * 以下4个函数增加计数值
	 */
	public void incPV() {
		pv++;changed=true;
	}
	public void incIP() {
		ip++;changed=true;
	}
	public void incUV() {
		uv++;changed=true;
	}
	public void incSS() {
		ss++;changed=true;
	}
	/**
	 * 以下4个函数get计数值
	 */
	public int getPV() {
		return pv;
	}
	public int getIP() {
		return ip;
	}
	public int getUV() {
		return uv;
	}
	public int getSS() {
		return ss;
	}
	/**
	 * 以下4个函数set计数值
	 */
	public void setPV(int pv) {
		this.pv = pv;
	}
	public void setIP(int ip) {
		this.ip = ip;
	}
	public void setUV(int uv) {
		this.uv = uv;
	}
	public void setSS(int ss) {
		this.ss = ss;
	}
	/**
	 * 以下2个函数操作计数值是否更改
	 */
	public boolean isChanged() {
		return changed;
	}
	public void setChanged(boolean changed) {
		this.changed = changed;
	}
	/**
	 * 以下2个函数操作计数值是否新增加的
	 */
	public boolean isNewCounter() {
		return newCounter;
	}
	public void setNewCounter(boolean newCounter) {
		this.newCounter = newCounter;
	}
	public void setInserted() {
		this.changed = false;
		this.newCounter = false;
	}
	
}
